Skip to content

chore(mcp): proper cleanup for signalToPromise#41160

Open
Skn0tt wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt/fix-signal-to-promise-dispose
Open

chore(mcp): proper cleanup for signalToPromise#41160
Skn0tt wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt/fix-signal-to-promise-dispose

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented Jun 5, 2026

Summary

  • signalToPromise returned a no-op dispose, leaking the 'abort' listener it adds to the AbortSignal.
  • Implement dispose to remove the listener (with an early signal.aborted fast path).
  • Call dispose() in a finally at the single caller in the test MCP context so the listener is cleaned up on every exit path.

signalToPromise returned a no-op dispose, so the 'abort' listener it
registered on the AbortSignal was never removed. The single caller in
the test MCP context also discarded dispose entirely. Implement dispose
to remove the listener and call it in a finally around the test run race.
@Skn0tt Skn0tt changed the title fix(mcp): implement signalToPromise dispose to remove abort listener chore(mcp): proper cleanup for signalToPromise Jun 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Test results for "MCP"

1 failed
❌ [webkit] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-windows-latest-webkit

7262 passed, 1109 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:682 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:682 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`

39543 passed, 771 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant